<template>
  <div>
    <p><input type="text" v-model="dl.phone" placeholder="请输入登录手机号"></p>
    <p><input type="text" v-model="dl.password" placeholder="请输入密码"></p>
    <p><button @click="log">登录</button></p>
  </div>
</template>

<script>
export default {
    data(){
        return{
            dl:{
                phone:'',
                password:''
            }
        }
    },
    methods:{
        log(){
            this.$axios.post('login/', this.dl).then((res)=>{
                if(res.data.code == 200){
                    alert('登录成功')
                    this.$router.push('/show')
                }else{
                    alert(res.data.msg)
                }
            })
        }
    }
}
</script>

<style>

</style>